package com.bana.sys.service;

import com.bana.sys.dao.PersonDAO;
import com.bana.sys.dao.UserDAO;
import com.bana.sys.model.Person;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import javax.annotation.Resource;


@Service
public class PersonService {

    @Resource
    PersonDAO personDAO;

    @Resource
    UserDAO userDAO;

    @Transactional
    public void deletePerson(Person person)
    {
        if(person.getRybm()==0)
        {
            return;
        }
        //userDAO.updatePerson(person.getRybm());
        personDAO.deletePerson(person);
    }
}
